# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.Forms.V1.Model.CreateWatchRequest do
  @moduledoc """
  Create a new watch.

  ## Attributes

  *   `watch` (*type:* `GoogleApi.Forms.V1.Model.Watch.t`, *default:* `nil`) - Required. The watch object. No ID should be set on this object; use `watch_id` instead.
  *   `watchId` (*type:* `String.t`, *default:* `nil`) - The ID to use for the watch. If specified, the ID must not already be in use. If not specified, an ID is generated. This value should be 4-63 characters, and valid characters are /a-z-/.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :watch => GoogleApi.Forms.V1.Model.Watch.t() | nil,
          :watchId => String.t() | nil
        }

  field(:watch, as: GoogleApi.Forms.V1.Model.Watch)
  field(:watchId)
end

defimpl Poison.Decoder, for: GoogleApi.Forms.V1.Model.CreateWatchRequest do
  def decode(value, options) do
    GoogleApi.Forms.V1.Model.CreateWatchRequest.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.Forms.V1.Model.CreateWatchRequest do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
